package org.sky.axis2.javacomplextype;

import org.apache.axiom.om.OMElement;
import org.apache.axis2.databinding.utils.BeanUtil;
import java.util.*;
import javax.xml.namespace.QName;

public class PersonService {
	public OMElement getPersons(OMElement person) {
		Person man = new Person();
		List<Person> list = new ArrayList<Person>();
		man.setName("Wallance Shao");
		man.setAge("25");
		list.add((Person) man.clone());

		man.setAge("11");
		man.setName("Hong Wayne");
		list.add((Person) man.clone());
		OMElement omElement = BeanUtil.getOMElement(new QName("root"),
				list.toArray(), new QName("person"), false, null);
		return omElement;
	}
}